import request from '@/utils/request'

// 查询采购订单信息列表
export function listPurchaseOrder(query) {
  return request({
    url: '/woodPurchase/purchaseOrder/list',
    method: 'get',
    params: query
  })
}

// 查询采购订单信息详细
export function getPurchaseOrder(orderId) {
  return request({
    url: '/woodPurchase/purchaseOrder/' + orderId,
    method: 'get'
  })
}

// 新增采购订单信息
export function addPurchaseOrder(data) {
  return request({
    url: '/woodPurchase/purchaseOrder',
    method: 'post',
    data: data
  })
}

// 修改采购订单信息
export function updatePurchaseOrder(data) {
  return request({
    url: '/woodPurchase/purchaseOrder',
    method: 'put',
    data: data
  })
}

// 批量修改采购订单状态
export function batchEditStatusPurchaseOrder(data) {
  return request({
    url: '/woodPurchase/purchaseOrder/editBatch',
    method: 'post',
    data: data
  })
}

// 删除采购订单信息
export function delPurchaseOrder(orderId) {
  return request({
    url: '/woodPurchase/purchaseOrder/' + orderId,
    method: 'delete'
  })
}

// 导出采购订单信息
export function exportPurchaseOrder(query) {
  return request({
    url: '/woodPurchase/purchaseOrder/export',
    method: 'get',
    params: query
  })
}